package com.sch.hospital.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sch.hospital.Mapper.MedicalrecordMapper;
import com.sch.hospital.domain.Medicalrecord;
import com.sch.hospital.service.IMedicalrecordService;

/**
 * 医疗记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-30
 */
@Service
public class MedicalrecordServiceImpl implements IMedicalrecordService 
{
    @Autowired
    private MedicalrecordMapper medicalrecordMapper;

    /**
     * 查询医疗记录
     * 
     * @param id 医疗记录主键
     * @return 医疗记录
     */
    @Override
    public Medicalrecord selectMedicalrecordById(Long id)
    {
        return medicalrecordMapper.selectMedicalrecordById(id);
    }

    /**
     * 查询医疗记录列表
     * 
     * @param medicalrecord 医疗记录
     * @return 医疗记录
     */
    @Override
    public List<Medicalrecord> selectMedicalrecordList(Medicalrecord medicalrecord)
    {
        return medicalrecordMapper.selectMedicalrecordList(medicalrecord);
    }

    /**
     * 新增医疗记录
     * 
     * @param medicalrecord 医疗记录
     * @return 结果
     */
    @Override
    public int insertMedicalrecord(Medicalrecord medicalrecord)
    {
        return medicalrecordMapper.insertMedicalrecord(medicalrecord);
    }

    /**
     * 修改医疗记录
     * 
     * @param medicalrecord 医疗记录
     * @return 结果
     */
    @Override
    public int updateMedicalrecord(Medicalrecord medicalrecord)
    {
        return medicalrecordMapper.updateMedicalrecord(medicalrecord);
    }

    /**
     * 批量删除医疗记录
     * 
     * @param ids 需要删除的医疗记录主键
     * @return 结果
     */
    @Override
    public int deleteMedicalrecordByIds(Long[] ids)
    {
        return medicalrecordMapper.deleteMedicalrecordByIds(ids);
    }

    /**
     * 删除医疗记录信息
     * 
     * @param id 医疗记录主键
     * @return 结果
     */
    @Override
    public int deleteMedicalrecordById(Long id)
    {
        return medicalrecordMapper.deleteMedicalrecordById(id);
    }
}
